diff --git a/features/common.feature b/features/common.feature index b9dc7093c6..2253507bbf 100644 --- a/features/common.feature +++ b/features/common.feature @@ -65,26 +65,26 @@ Feature: cli-kintone common test cases Scenario: CliKintoneTest-14 Should return the error message when no authorized information When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app 1" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520\] \[CB_AU01\] Please login." + And The output error message should match with the pattern: "\[401\] \[CB_AU01\] Please login." Scenario: CliKintoneTest-15 Should return the error message when the API token is incorrect When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app 1 --api-token abc" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520\] \[GAIA_IA02\] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400\] \[GAIA_IA02\] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-17 Should return the error message when the user information is incorrect When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app 1 --username abc --password abc" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520\] \[CB_WA01\] Password authentication failed." + And The output error message should match with the pattern: "\[401\] \[CB_WA01\] Password authentication failed." Scenario: CliKintoneTest-18 Should return the error message when authorization information is incomplete (password) Given Load username and password of user "user_for_common" as env vars: "USERNAME" and "PASSWORD" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app 1 --username $USERNAME" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520\] \[CB_WA01\] Password authentication failed." + And The output error message should match with the pattern: "\[401\] \[CB_WA01\] Password authentication failed." Scenario: CliKintoneTest-19 Should return the error message when incorrect authorization information (password) Given Load username and password of user "user_for_common" as env vars: "USERNAME" and "PASSWORD" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app 1 --username $USERNAME --password abc" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520\] \[CB_WA01\] Password authentication failed." + And The output error message should match with the pattern: "\[401\] \[CB_WA01\] Password authentication failed." diff --git a/features/delete.feature b/features/delete.feature index 08e0b8e1b6..875485e1e2 100644 --- a/features/delete.feature +++ b/features/delete.feature @@ -57,7 +57,7 @@ Feature: cli-kintone delete command And Load app token of the app "app_for_draft_token" with exact permissions "view,delete" as env var: "API_TOKEN" When I run the command with args "record delete --app $APP_ID --base-url $$TEST_KINTONE_BASE_URL --api-token $API_TOKEN --yes" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-131 Should return the error message when deleting records with two valid API Token. Given Load app ID of the app "app_for_delete" as env var: "APP_ID" @@ -86,7 +86,7 @@ Feature: cli-kintone delete command And Load app token of the app "app_for_delete" with exact permissions "view,delete" as env var: "API_TOKEN" When I run the command with args "record delete --app $APP_ID --base-url $$TEST_KINTONE_BASE_URL --api-token $API_TOKEN,INVALID_API_TOKEN_2 --yes" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-134 Should return the error message when authorizing with username/password. Given Load app ID of the app "app_for_delete" as env var: "APP_ID" diff --git a/features/export.feature b/features/export.feature index b70e5712c6..d018fb5903 100644 --- a/features/export.feature +++ b/features/export.feature @@ -64,7 +64,7 @@ Feature: cli-kintone export command And Load app token of the app "app_for_draft_token" with exact permissions "view" as env var: "DRAFT_API_TOKEN" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $DRAFT_API_TOKEN" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-83 Should return the error message when exporting the record with a non-relevant API Token. Given Load app ID of the app "app_for_export" as env var: "APP_ID" @@ -104,7 +104,7 @@ Feature: cli-kintone export command And Load app token of the app "app_for_export" with exact permissions "view" as env var: "API_TOKEN_1" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $API_TOKEN_1,INVALID_API_TOKEN" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-87 Should return the record contents in CSV format with --username and --password options. Given The app "app_for_export" has no records @@ -280,7 +280,7 @@ Feature: cli-kintone export command And Load app token of the app "app_for_export" with exact permissions "view" as env var: "API_TOKEN" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $API_TOKEN --condition Unknown_Field>=20" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IQ11] Specified field \(Unknown_Field\) not found." + And The output error message should match with the pattern: "\[400] \[GAIA_IQ11] Specified field \(Unknown_Field\) not found." Scenario: CliKintoneTest-97 Should return the record contents with valid condition query (-c option). Given The app "app_for_export" has no records @@ -324,7 +324,7 @@ Feature: cli-kintone export command And Load app token of the app "app_for_export" with exact permissions "view" as env var: "API_TOKEN" When I run the command with args "record export --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $API_TOKEN --order-by 'Unknown_Field desc'" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IQ11] Specified field \(Unknown_Field\) not found." + And The output error message should match with the pattern: "\[400] \[GAIA_IQ11] Specified field \(Unknown_Field\) not found." Scenario: CliKintoneTest-100 Should return the record contents when exporting the record with --fields specified. Given The app "app_for_export" has no records diff --git a/features/import.feature b/features/import.feature index 1bad4869e7..4e66481d8e 100644 --- a/features/import.feature +++ b/features/import.feature @@ -70,7 +70,7 @@ Feature: cli-kintone import command And Load app token of the app "app_for_draft_token" with exact permissions "add" as env var: "API_TOKEN" When I run the command with args "record import --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $API_TOKEN --file-path CliKintoneTest-24.csv" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-25 Should return the error message when importing records with two valid API Token. Given The CSV file "CliKintoneTest-25.csv" with content as below: @@ -109,7 +109,7 @@ Feature: cli-kintone import command And Load app token of the app "app_for_import" with exact permissions "add" as env var: "API_TOKEN_IMPORT" When I run the command with args "record import --base-url $$TEST_KINTONE_BASE_URL --app $APP_ID --api-token $API_TOKEN_IMPORT,invalid_token --file-path CliKintoneTest-27.csv" Then I should get the exit code is non-zero - And The output error message should match with the pattern: "\[520] \[GAIA_IA02] The specified API token does not match the API token generated via an app." + And The output error message should match with the pattern: "\[400] \[GAIA_IA02] The specified API token does not match the API token generated via an app." Scenario: CliKintoneTest-28 Should return the error message when importing records with an API Token without Add permission. Given The CSV file "CliKintoneTest-28.csv" with content as below: