@@ -10,8 +10,7 @@ import (
1010)
1111
1212const (
13- SSHKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJEoOOgQBLJPs4g/XcPTKT82NywNPpxeuA20FlOPlpO [email protected] " 14- SSHKeyWithoutComment = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJEoOOgQBLJPs4g/XcPTKT82NywNPpxeuA20FlOPlpO"
13+ SSHKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJEoOOgQBLJPs4g/XcPTKT82NywNPpxeuA20FlOPlpO [email protected] " 1514)
1615
1716func TestAccSSHKey_basic (t * testing.T ) {
@@ -34,7 +33,7 @@ func TestAccSSHKey_basic(t *testing.T) {
3433 Check : resource .ComposeTestCheckFunc (
3534 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
3635 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name ),
37- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
36+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
3837 ),
3938 },
4039 {
@@ -47,7 +46,7 @@ func TestAccSSHKey_basic(t *testing.T) {
4746 Check : resource .ComposeTestCheckFunc (
4847 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
4948 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name + "-updated" ),
50- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
49+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
5150 ),
5251 },
5352 },
@@ -74,7 +73,7 @@ func TestAccSSHKey_WithNewLine(t *testing.T) {
7473 Check : resource .ComposeTestCheckFunc (
7574 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
7675 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name ),
77- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
76+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
7877 ),
7978 },
8079 },
@@ -101,7 +100,7 @@ func TestAccSSHKey_ChangeResourceName(t *testing.T) {
101100 Check : resource .ComposeTestCheckFunc (
102101 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.first" ),
103102 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.first" , "name" , name ),
104- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.first" , "public_key" , SSHKeyWithoutComment ),
103+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.first" , "public_key" , SSHKey ),
105104 ),
106105 },
107106 {
@@ -114,7 +113,7 @@ func TestAccSSHKey_ChangeResourceName(t *testing.T) {
114113 Check : resource .ComposeTestCheckFunc (
115114 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.second" ),
116115 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.second" , "name" , name ),
117- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.second" , "public_key" , SSHKeyWithoutComment ),
116+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.second" , "public_key" , SSHKey ),
118117 ),
119118 },
120119 },
@@ -141,7 +140,7 @@ func TestAccSSHKey_Disabled(t *testing.T) {
141140 Check : resource .ComposeTestCheckFunc (
142141 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
143142 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name ),
144- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
143+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
145144 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "disabled" , "false" ),
146145 ),
147146 },
@@ -156,7 +155,7 @@ func TestAccSSHKey_Disabled(t *testing.T) {
156155 Check : resource .ComposeTestCheckFunc (
157156 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
158157 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name ),
159- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
158+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
160159 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "disabled" , "true" ),
161160 ),
162161 },
@@ -171,7 +170,7 @@ func TestAccSSHKey_Disabled(t *testing.T) {
171170 Check : resource .ComposeTestCheckFunc (
172171 iamchecks .CheckSSHKeyExists (tt , "scaleway_iam_ssh_key.main" ),
173172 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "name" , name ),
174- resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKeyWithoutComment ),
173+ resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "public_key" , SSHKey ),
175174 resource .TestCheckResourceAttr ("scaleway_iam_ssh_key.main" , "disabled" , "false" ),
176175 ),
177176 },
0 commit comments