github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/identity/v3/federation/providers/testing/fixtures.go (about) 1 package testing 2 3 import ( 4 "fmt" 5 "strings" 6 ) 7 8 const ( 9 providerID = "ACME" 10 providerDescription = "Stores ACME identities" 11 12 listURI = "/OS-FEDERATION/identity_providers" 13 ) 14 15 var ( 16 providerURI = fmt.Sprintf("%s/%s", listURI, providerID) 17 18 providerResponse = fmt.Sprintf(` 19 { 20 "identity_provider": { 21 "description": "%s", 22 "enabled": true, 23 "id": "%s", 24 "remote_ids": [], 25 "links": { 26 "protocols": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME/protocols", 27 "self": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME" 28 } 29 } 30 } 31 `, providerDescription, providerID) 32 33 providerListResponse = fmt.Sprintf(` 34 { 35 "identity_providers": [ 36 { 37 "description": "%s", 38 "enabled": true, 39 "id": "%s", 40 "remote_ids": [], 41 "links": { 42 "protocols": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME/protocols", 43 "self": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME" 44 } 45 }, 46 { 47 "description": "Stores contractor identities", 48 "enabled": false, 49 "remote_ids": [], 50 "id": "ACME-contractors", 51 "links": { 52 "protocols": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME-contractors/protocols", 53 "self": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME-contractors" 54 } 55 } 56 ], 57 "links": { 58 "next": null, 59 "previous": null, 60 "self": "https://example.com/v3/OS-FEDERATION/identity_providers" 61 } 62 } 63 `, providerDescription, providerID) 64 65 updatedProviderResposnse = strings.ReplaceAll(providerResponse, "true", "false") 66 )