Something went wrong while fetching comments. Please try again.
Created by: miveronese
Ticket: https://sourcegraph.atlassian.net/browse/CLOUD-81
This PR adds the following:
Run the new tests with:
go test ./cmd/frontend/graphqlbackend/. -v -run TestRemoveOrganization
and
go test ./internal/database/. -run TestDeleteOrganization_OnPremise -v
go test ./internal/database/. -run TestDeleteOrganization_OnCloud -v
Case one: you are in the DotCom mode but don't have the feature flag "org-deletion" enabled or it is set to false
Run sg start dotcom
Go to the /api/console
Try to delete an organization by running the "removeOrganization" mutation
You should see an error message informing that this operation is not supported
Case two: you are in the DotCom mode and the feature flag "org-deletion" is set to true
Run sg start dotcom
Go to the /api/console
Try to hard delete an organization by running the "removeOrganization" mutation
All should work and the org will be hard deleted from the orgs table and from the associated tables
Case three: you are not in the DotCom mode
Run sg start
Go to the /api/console
Try to hard delete an organization
You should see an error message informing that this operation is not supported
mutation CreateFeatureFlag{
createFeatureFlag(
name: "org-deletion",
value: false,
){
__typename
}
}
mutation {
removeOrganization(organization: "org-id") {
alwaysNil
}
}