Skip to content

Commit

Permalink
fix: workflow add stripe
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatACotton committed Apr 6, 2024
1 parent 6ba6e9f commit 6a5b21a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: execute small test
run: |
/usr/bin/go test -timeout 30s -run ^(TestCartUtils_InspectCart|TestCartUtils_InspectPayload|TestCartUtils_ConvertCart|TestCartUtils_GetTotalAmount)$ github.com/charisworks/charisworks-backend/internal/cart
/usr/bin/go test -timeout 30s -run ^(TestInspectedRegisterPayload|TestInspectedUpdatePayload)$ github.com/charisworks/charisworks-backend/internal/manufacturer
/usr/bin/go test -timeout 30s -run ^(TestInspectProfileUpdatePayload|TestInspectAddressUpdatePayload|TestInspectAddressRegisterPayload)$ github.com/charisworks/charisworks-backend/internal/users
- name: Setup databases
run: |
sudo apt-get update
Expand All @@ -24,6 +30,3 @@ jobs:
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
sudo apt update
sudo apt install stripe
bash test_server.sh
5 changes: 3 additions & 2 deletions internal/manufacturer/manufacturer_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"reflect"
"testing"

"github.com/charisworks/charisworks-backend/internal/items"
"github.com/charisworks/charisworks-backend/internal/utils"
)

Expand Down Expand Up @@ -188,7 +189,7 @@ func TestInspectedUpdatePayload(t *testing.T) {
Tags: []string{"aaa", "bbb"},
},
want: map[string]interface{}{
"status": "Available",
"status": items.Available,
"tags": []string{"aaa", "bbb"},
},
},
Expand Down Expand Up @@ -221,7 +222,7 @@ func TestInspectedUpdatePayload(t *testing.T) {
log.Print(err.Error())
}
if !reflect.DeepEqual(payload, tt.want) {
t.Errorf("%v,got,%v,want%v", tt.name, payload, tt.want)
t.Errorf("got %v, want %v", payload, tt.want)
}

})
Expand Down

0 comments on commit 6a5b21a

Please sign in to comment.