mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-25 23:23:21 -05:00
Split integration tests into their own package
This commit is contained in:
parent
b907682fa3
commit
e52719c3f7
@ -59,7 +59,7 @@ script:
|
||||
- touch $GOPATH/src/github.com/aclindsa/moneygo/internal/handlers/cusip_list.csv
|
||||
# Build and test MoneyGo
|
||||
- go generate -v github.com/aclindsa/moneygo/internal/handlers
|
||||
- go test -v -covermode=count -coverpkg github.com/aclindsa/moneygo/internal/config,github.com/aclindsa/moneygo/internal/handlers,github.com/aclindsa/moneygo/internal/models,github.com/aclindsa/moneygo/internal/store,github.com/aclindsa/moneygo/internal/store/db -coverprofile=coverage.out github.com/aclindsa/moneygo/internal/handlers
|
||||
- go test -v -covermode=count -coverpkg github.com/aclindsa/moneygo/internal/config,github.com/aclindsa/moneygo/internal/handlers,github.com/aclindsa/moneygo/internal/models,github.com/aclindsa/moneygo/internal/store,github.com/aclindsa/moneygo/internal/store/db -coverprofile=coverage.out github.com/aclindsa/moneygo/internal/integration
|
||||
|
||||
# Report the test coverage
|
||||
after_script:
|
||||
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"testing"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/models"
|
||||
@ -26,7 +26,7 @@ func TestImportGnucash(t *testing.T) {
|
||||
}
|
||||
|
||||
// Import and ensure it didn't return a nasty error code
|
||||
if err = importGnucash(d.clients[0], "handlers_testdata/example.gnucash"); err != nil {
|
||||
if err = importGnucash(d.clients[0], "testdata/example.gnucash"); err != nil {
|
||||
t.Fatalf("Error importing from Gnucash: %s\n", err)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@ -28,12 +28,12 @@ func TestImportOFXChecking(t *testing.T) {
|
||||
}
|
||||
|
||||
// Import and ensure it didn't return a nasty error code
|
||||
if err = importOFX(d.clients[0], d.accounts[1].AccountId, "handlers_testdata/checking_20171126.ofx"); err != nil {
|
||||
if err = importOFX(d.clients[0], d.accounts[1].AccountId, "testdata/checking_20171126.ofx"); err != nil {
|
||||
t.Fatalf("Error importing OFX: %s\n", err)
|
||||
}
|
||||
accountBalanceHelper(t, d.clients[0], &d.accounts[1], "2493.19")
|
||||
|
||||
if err = importOFX(d.clients[0], d.accounts[1].AccountId, "handlers_testdata/checking_20171129.ofx"); err != nil {
|
||||
if err = importOFX(d.clients[0], d.accounts[1].AccountId, "testdata/checking_20171129.ofx"); err != nil {
|
||||
t.Fatalf("Error importing OFX: %s\n", err)
|
||||
}
|
||||
accountBalanceHelper(t, d.clients[0], &d.accounts[1], "5336.27")
|
||||
@ -56,7 +56,7 @@ func TestImportOFXCreditCard(t *testing.T) {
|
||||
}
|
||||
|
||||
// Import and ensure it didn't return a nasty error code
|
||||
if err = importOFX(d.clients[0], d.accounts[7].AccountId, "handlers_testdata/creditcard.ofx"); err != nil {
|
||||
if err = importOFX(d.clients[0], d.accounts[7].AccountId, "testdata/creditcard.ofx"); err != nil {
|
||||
t.Fatalf("Error importing OFX: %s\n", err)
|
||||
}
|
||||
accountBalanceHelper(t, d.clients[0], &d.accounts[7], "-4.49")
|
||||
@ -118,7 +118,7 @@ func TestImportOFX401kMutualFunds(t *testing.T) {
|
||||
}
|
||||
|
||||
// Import and ensure it didn't return a nasty error code
|
||||
if err = importOFX(d.clients[0], account.AccountId, "handlers_testdata/401k_mutualfunds.ofx"); err != nil {
|
||||
if err = importOFX(d.clients[0], account.AccountId, "testdata/401k_mutualfunds.ofx"); err != nil {
|
||||
t.Fatalf("Error importing OFX: %s\n", err)
|
||||
}
|
||||
accountBalanceHelper(t, d.clients[0], account, "-192.10")
|
||||
@ -177,7 +177,7 @@ func TestImportOFXBrokerage(t *testing.T) {
|
||||
}
|
||||
|
||||
// Import and ensure it didn't return a nasty error code
|
||||
if err = importOFX(d.clients[0], account.AccountId, "handlers_testdata/brokerage.ofx"); err != nil {
|
||||
if err = importOFX(d.clients[0], account.AccountId, "testdata/brokerage.ofx"); err != nil {
|
||||
t.Fatalf("Error importing OFX: %s\n", err)
|
||||
}
|
||||
accountBalanceHelper(t, d.clients[0], account, "387.48")
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package handlers_test
|
||||
package integration_test
|
||||
|
||||
import (
|
||||
"github.com/aclindsa/moneygo/internal/handlers"
|
Loading…
Reference in New Issue
Block a user