@@ -87,8 +87,8 @@ public void shouldValidateABadConfiguration() throws Exception {
87
87
" \" key\" : \" kubernetes_cluster_url\" \n " +
88
88
" },\n " +
89
89
" {\n " +
90
- " \" message\" : \" Oauth token must not be blank.\" ,\n " +
91
- " \" key\" : \" oauth_token \" \n " +
90
+ " \" message\" : \" Security token must not be blank.\" ,\n " +
91
+ " \" key\" : \" security_token \" \n " +
92
92
" }\n " +
93
93
"]" , response .responseBody (), true );
94
94
}
@@ -100,7 +100,7 @@ public void shouldValidateAGoodConfiguration() throws Exception {
100
100
ValidatePluginSettingsRequest settings = new ValidatePluginSettingsRequest ();
101
101
settings .put ("go_server_url" , "https://ci.example.com/go" );
102
102
settings .put ("kubernetes_cluster_url" , "https://cluster.example.com" );
103
- settings .put ("oauth_token " , "some-token" );
103
+ settings .put ("security_token " , "some-token" );
104
104
GoPluginApiResponse response = new ValidateConfigurationExecutor (settings , null , factory ).execute ();
105
105
106
106
assertThat (response .responseCode (), is (200 ));
@@ -114,7 +114,7 @@ public void shouldValidateGoServerUrl() throws Exception {
114
114
ValidatePluginSettingsRequest settings = new ValidatePluginSettingsRequest ();
115
115
serverInfo .setSecureSiteUrl (null );
116
116
settings .put ("kubernetes_cluster_url" , "https://cluster.example.com" );
117
- settings .put ("oauth_token " , "some-token" );
117
+ settings .put ("security_token " , "some-token" );
118
118
GoPluginApiResponse response = new ValidateConfigurationExecutor (settings , pluginRequest , factory ).execute ();
119
119
120
120
assertThat (response .responseCode (), is (200 ));
@@ -133,7 +133,7 @@ public void shouldValidateGoServerHTTPSUrlFormat() throws Exception {
133
133
ValidatePluginSettingsRequest settings = new ValidatePluginSettingsRequest ();
134
134
settings .put ("go_server_url" , "foo.com/go(" );
135
135
settings .put ("kubernetes_cluster_url" , "https://cluster.example.com" );
136
- settings .put ("oauth_token " , "some-token" );
136
+ settings .put ("security_token " , "some-token" );
137
137
GoPluginApiResponse response = new ValidateConfigurationExecutor (settings , pluginRequest , factory ).execute ();
138
138
139
139
assertThat (response .responseCode (), is (200 ));
@@ -152,7 +152,7 @@ public void shouldValidateGoServerUrlFormat() throws Exception {
152
152
ValidatePluginSettingsRequest settings = new ValidatePluginSettingsRequest ();
153
153
settings .put ("go_server_url" , "https://foo.com" );
154
154
settings .put ("kubernetes_cluster_url" , "https://cluster.example.com" );
155
- settings .put ("oauth_token " , "some-token" );
155
+ settings .put ("security_token " , "some-token" );
156
156
GoPluginApiResponse response = new ValidateConfigurationExecutor (settings , pluginRequest , factory ).execute ();
157
157
158
158
assertThat (response .responseCode (), is (200 ));
@@ -178,8 +178,8 @@ public void shouldValidateOAuthTokenWhenAuthenticationStrategyIsSetToOauthToken(
178
178
179
179
JSONAssert .assertEquals ("[" +
180
180
" {\n " +
181
- " \" message\" : \" Oauth token must not be blank.\" ,\n " +
182
- " \" key\" : \" oauth_token \" \n " +
181
+ " \" message\" : \" Security token must not be blank.\" ,\n " +
182
+ " \" key\" : \" security_token \" \n " +
183
183
" }\n " +
184
184
"]" , response .responseBody (), true );
185
185
}
@@ -191,7 +191,7 @@ public void shouldValidateNamespaceExistence() throws JSONException {
191
191
ValidatePluginSettingsRequest settings = new ValidatePluginSettingsRequest ();
192
192
settings .put ("go_server_url" , "https://ci.example.com/go" );
193
193
settings .put ("kubernetes_cluster_url" , "https://cluster.example.com" );
194
- settings .put ("oauth_token " , "some-token" );
194
+ settings .put ("security_token " , "some-token" );
195
195
settings .put ("namespace" , "gocd" );
196
196
GoPluginApiResponse response = new ValidateConfigurationExecutor (settings , null , factory ).execute ();
197
197
0 commit comments