Skip to content

Commit

Permalink
fix location regex
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Sep 18, 2024
1 parent b8afca8 commit dd0123c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e_test/combined_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Description:\s+-
Created:.*?
IP:\s+(?:[0-9]{1,3}\.){3}[0-9]{1,3}
Blocked:\s+no
Home Location:\s+[a-z]{3}[0-9]+
Home Location:\s+[a-z]{3}[0-9]*
Server:
\s+ID:\s+[0-9]+
\s+Name:\s+test-server
Expand Down
6 changes: 3 additions & 3 deletions e2e_test/floatingip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Description:\s+Some description
Created:.*?
IP:\s+(?:[0-9]{1,3}\.){3}[0-9]{1,3}
Blocked:\s+no
Home Location:\s+fsn1
Home Location:\s+[a-z]{3}[0-9]*
Server:
\s+Not assigned
DNS:
Expand All @@ -113,7 +113,7 @@ Labels:
out, err = runCommand(t, "floating-ip", "list", "--output", "columns=id,name,type,ip,dns,server,home,blocked,protection,labels,created,age")
require.NoError(t, err)
assert.Regexp(t, `^ID +NAME +TYPE +IP +DNS +SERVER +HOME +BLOCKED +PROTECTION +LABELS +CREATED +AGE
[0-9]+ +new-test-floating-ip +ipv4 +(?:[0-9]{1,3}\.){3}[0-9]{1,3} +s1\.example\.com +- +fsn1 +no +delete +foo=bar.*?
[0-9]+ +new-test-floating-ip +ipv4 +(?:[0-9]{1,3}\.){3}[0-9]{1,3} +s1\.example\.com +- +[a-z]{3}[0-9]* +no +delete +foo=bar.*?
$`, out)

out, err = runCommand(t, "floating-ip", "list", "-o=json")
Expand Down Expand Up @@ -197,7 +197,7 @@ Description:\s+-
Created:.*?
IP:\s+[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+::\/64
Blocked:\s+no
Home Location:\s+fsn1
Home Location:\s+[a-z]{3}[0-9]*
Server:
\s+Not assigned
DNS:
Expand Down

0 comments on commit dd0123c

Please sign in to comment.