Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

コマンドの動作テストの導入 #14

Closed
KEINOS opened this issue May 27, 2021 · 1 comment
Closed

コマンドの動作テストの導入 #14

KEINOS opened this issue May 27, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@KEINOS
Copy link
Member

KEINOS commented May 27, 2021

各コマンドの動作テスト

  • リファクタに入る前に、現状のスクリプトに対してテスト環境を整えたい。
  • せっかく GitHub Actions で Linux、Windows、macOS のランナーが使えるので活用したい。
    • でも PowerShell がわからん。Bash on Win に限定する?
  • まずは「既存の各コマンドの動作サンプルを動かして意図する結果が得られるか」テストするところから始めたい。

フレームワーク

@KEINOS KEINOS added the enhancement New feature or request label May 27, 2021
KEINOS added a commit to KEINOS/Fork_QiiCipher that referenced this issue May 28, 2021
KEINOS added a commit to KEINOS/Fork_QiiCipher that referenced this issue May 29, 2021
@KEINOS KEINOS added the WIP There is a draft PR for this label May 29, 2021
KEINOS added a commit to KEINOS/Fork_QiiCipher that referenced this issue May 30, 2021
KEINOS added a commit to KEINOS/Fork_QiiCipher that referenced this issue Jun 2, 2021
KEINOS added a commit that referenced this issue Jun 2, 2021
Issue #14 関連(以下時系列)

* feat: shellspec install
* feat: test:「引数なし」時の動作テスト
  - 各コマンドが「引数なし」で呼ばれた場合に、ヘルプの表示とステータス 1  で終了するかのテスト。
* doc: add GitHub Action ステータスバッジ
* chore: 公開・秘密鍵の設置(一般テスト用)
* ed25519 と rsa (4096 bit) の鍵ペアで、パスフレーズ「あり」と「なし」の両方の 4 つを設置
* 古い OpenSSH のバージョン用は別途コミット
* chore: add pkcs8 sample for testing
* docs: tests の README.md リファレンス追加
* docs: 表示の見栄え調整
* fix: openssl 未インストールのエラー表示
* chore: *.cache を gitignore
* chore: add apk add openssl to Dockerfile
* fix: bad permissions -> enc 中に保存した公開鍵

```shellsession
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            Permissions 0644 for '/tmp/KEINOS..pub' are too open.
            It is required that your private key files are NOT accessible by others.
            This private key will be ignored.
```

* chore: エラー表示は STDERR に
* chore: add sample text data
* feat: enc test
* fix: コマンドエイリアスはモックしづらいため削除
  - パス指定でコマンド実行に変更
* fix: shellcheck SC1073,SC1072
* fix:  Illegal number: line 69
* feat: test for checkkeylength command
* docs: テストのファイル名変更 basic_test.sh -> no_arg_test.sh
  - basic テストでなく arg がない場合のテストなので、ファイル名からわかるようにした。
@KEINOS
Copy link
Member Author

KEINOS commented Jun 3, 2021

PR #18 でテスト自体は導入できたので Close 〜

テストの精度は徐々に叩き上げていきましょー

@KEINOS KEINOS closed this as completed Jun 3, 2021
@KEINOS KEINOS removed the WIP There is a draft PR for this label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant