diff --git a/zitadel/application_saml/application_saml_test_dep/dependency.go b/zitadel/application_saml/application_saml_test_dep/dependency.go index 2be5fe3d..46a60dc3 100644 --- a/zitadel/application_saml/application_saml_test_dep/dependency.go +++ b/zitadel/application_saml/application_saml_test_dep/dependency.go @@ -9,15 +9,17 @@ import ( "github.com/zitadel/terraform-provider-zitadel/zitadel/helper/test_utils" ) -const metadataXML = "\n\n \n urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n \n \n \n" - func Create(t *testing.T, frame *test_utils.OrgTestFrame, projectID, name string) (string, string) { return test_utils.CreateDefaultDependency(t, "zitadel_application_saml", application_saml.AppIDVar, func() (string, error) { app, err := frame.AddSAMLApp(frame, &management.AddSAMLAppRequest{ ProjectId: projectID, Name: name, - Metadata: &management.AddSAMLAppRequest_MetadataXml{MetadataXml: []byte(metadataXML)}, + Metadata: &management.AddSAMLAppRequest_MetadataXml{MetadataXml: metadata(name)}, }) return app.GetAppId(), err }) } + +func metadata(name string) []byte { + return []byte("\n\n \n urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n \n \n \n") +}