Skip to content

Commit

Permalink
fix: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Sep 15, 2024
1 parent 1bda1f7 commit e18d570
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Check Nix flake
run: nix flake check

- name: Run tests
run: nix develop --command bash -c 'go test ./...'
- name: Build app
run: nix build -L

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
pname = "github.com/Myzel394/config-lsp";
version = "v0.0.1";
src = ./.;
vendorHash = "sha256-KhyqogTyb3jNrGP+0Zmn/nfx+WxzjgcrFOp2vivFgT0=";
vendorHash = "sha256-PUVmhdbmfy1FaSzLt3SIK0MtWezsjb+PL+Z5YxMMhdw=";
checkPhase = ''
go test -v $(pwd)/...
'';
Expand Down
8 changes: 8 additions & 0 deletions handlers/wireguard/commands/wg-commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ func TestWireguardAvailable(
func TestWireguardPrivateKey(
t *testing.T,
) {
if !AreWireguardToolsAvailable() {
t.Skip("Wireguard tools not available")
}

privateKey, err := CreateNewPrivateKey()

if err != nil {
Expand All @@ -25,6 +29,10 @@ func TestWireguardPrivateKey(
func TestWireguardPublicKey(
t *testing.T,
) {
if !AreWireguardToolsAvailable() {
t.Skip("Wireguard tools not available")
}

privateKey := "UPBKR0kLF2C/+Ei5fwN5KHsAcon9xfBX+RWhebYFGWg="
publicKey, err := CreatePublicKey(privateKey)

Expand Down

0 comments on commit e18d570

Please sign in to comment.