Skip to content

Commit b8089e5

Browse files
Merge pull request #3261 from gophercloud/bp-v2-37efb25-2e64714-baa5df9-65463f1-67c72f8-eb1fa62-1d81d00-a9bd661-fb4700a-7580d13
[v2] Misc cleanups
2 parents 939402d + cfa40d7 commit b8089e5

File tree

48 files changed

+635
-522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+635
-522
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ lint:
2626
golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) golangci-lint run
2727
.PHONY: lint
2828

29+
format:
30+
gofmt -w -s $(shell pwd)
31+
.PHONY: format
32+
2933
unit:
3034
$(GO_TEST) ./...
3135
.PHONY: unit

internal/acceptance/openstack/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ func TestEC2AuthMethod(t *testing.T) {
5656

5757
authOptions := tokens.AuthOptions{
5858
Username: ao.Username,
59+
UserID: ao.UserID,
5960
Password: ao.Password,
6061
DomainName: ao.DomainName,
6162
DomainID: ao.DomainID,
62-
// We need a scope to get the token roles list
6363
Scope: tokens.Scope{
6464
ProjectID: ao.TenantID,
6565
ProjectName: ao.TenantName,

internal/acceptance/openstack/identity/v3/applicationcredentials_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ func TestApplicationCredentialsCRD(t *testing.T) {
3434

3535
authOptions := tokens.AuthOptions{
3636
Username: ao.Username,
37+
UserID: ao.UserID,
3738
Password: ao.Password,
3839
DomainName: ao.DomainName,
3940
DomainID: ao.DomainID,
40-
// We need a scope to get the token roles list
4141
Scope: tokens.Scope{
4242
ProjectID: ao.TenantID,
4343
ProjectName: ao.TenantName,
@@ -178,10 +178,10 @@ func TestApplicationCredentialsAccessRules(t *testing.T) {
178178

179179
authOptions := tokens.AuthOptions{
180180
Username: ao.Username,
181+
UserID: ao.UserID,
181182
Password: ao.Password,
182183
DomainName: ao.DomainName,
183184
DomainID: ao.DomainID,
184-
// We need a scope to get the token roles list
185185
Scope: tokens.Scope{
186186
ProjectID: ao.TenantID,
187187
ProjectName: ao.TenantName,

internal/acceptance/openstack/identity/v3/credentials_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ func TestCredentialsCRUD(t *testing.T) {
2424

2525
authOptions := tokens.AuthOptions{
2626
Username: ao.Username,
27+
UserID: ao.UserID,
2728
Password: ao.Password,
2829
DomainName: ao.DomainName,
2930
DomainID: ao.DomainID,
30-
// We need a scope to get the token roles list
3131
Scope: tokens.Scope{
3232
ProjectID: ao.TenantID,
3333
ProjectName: ao.TenantName,
@@ -101,10 +101,10 @@ func TestCredentialsValidateS3(t *testing.T) {
101101

102102
authOptions := tokens.AuthOptions{
103103
Username: ao.Username,
104+
UserID: ao.UserID,
104105
Password: ao.Password,
105106
DomainName: ao.DomainName,
106107
DomainID: ao.DomainID,
107-
// We need a scope to get the token roles list
108108
Scope: tokens.Scope{
109109
ProjectID: ao.TenantID,
110110
ProjectName: ao.TenantName,

internal/acceptance/openstack/identity/v3/ec2credentials_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ func TestEC2CredentialsCRD(t *testing.T) {
2323

2424
authOptions := tokens.AuthOptions{
2525
Username: ao.Username,
26+
UserID: ao.UserID,
2627
Password: ao.Password,
2728
DomainName: ao.DomainName,
2829
DomainID: ao.DomainID,
29-
// We need a scope to get the token roles list
3030
Scope: tokens.Scope{
3131
ProjectID: ao.TenantID,
3232
ProjectName: ao.TenantName,

internal/acceptance/openstack/identity/v3/federation_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
)
1616

1717
func TestListMappings(t *testing.T) {
18+
clients.RequireAdmin(t)
19+
1820
client, err := clients.NewIdentityV3Client()
1921
th.AssertNoErr(t, err)
2022

@@ -28,10 +30,10 @@ func TestListMappings(t *testing.T) {
2830
}
2931

3032
func TestMappingsCRUD(t *testing.T) {
31-
mappingName := tools.RandomString("TESTMAPPING-", 8)
32-
3333
clients.RequireAdmin(t)
3434

35+
mappingName := tools.RandomString("TESTMAPPING-", 8)
36+
3537
client, err := clients.NewIdentityV3Client()
3638
th.AssertNoErr(t, err)
3739

0 commit comments

Comments
 (0)