INNER CODE UNIT · Go

TestGenerate_ResourceNotSupportedV4

cloudflare/cf-terraforming · internal/app/cf-terraforming/cmd/generate_test.go:86

func TestGenerate_ResourceNotSupportedV4(t *testing.T) {
	output, err := executeCommandC(rootCmd, "generate", "--resource-type", "notreal")
	assert.Nil(t, err)
	assert.Equal(t, `"notreal" is not yet supported for automatic generation`, output)
}

func TestResourceGenerationV4(t *testing.T) {
	tests := map[string]struct {
		identiferType    string
		resourceType     string
		testdataFilename string
	}{
		"cloudflare access application simple (account)":     {identiferType: "account", resourceType: "cloudflare_access_application", testdataFilename: "cloudflare_access_application_simple_account"},
		"cloudflare access application with CORS (account)":  {identiferType: "account", resourceType: "cloudflare_access_application", testdataFilename: "cloudflare_access_application_with_cors_account"},
		"cloudflare access IdP OAuth (account)":              {identiferType: "account", resourceType: "cloudflare_access_identity_provider", testdataFilename: "cloudflare_access_identity_provider_oauth_account"},
		"cloudflare access IdP OAuth (zone)":                 {identiferType: "zone", resourceType: "cloudflare_access_identity_provider", testdataFilename: "cloudflare_access_identity_provider_oauth_zone"},
		"cloudflare access IdP OTP (account)":                {identiferType: "account", resourceType: "cloudflare_access_identity_provider", testdataFilename: "cloudflare_access_identity_provider_otp_account"},
		"cloudflare access IdP OTP (zone)":                   {identiferType: "zone", resourceType: "cloudflare_access_identity_provider", testdataFilename: "cloudflare_access_identity_provider_otp_zone"},

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…