1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 07:13:20 -05:00

Split integration tests into their own package

This commit is contained in:
Aaron Lindsay 2017-12-09 19:55:34 -05:00
parent b907682fa3
commit e52719c3f7
25 changed files with 25 additions and 25 deletions

View File

@ -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:

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"bytes"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"testing"

View File

@ -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)
}

View File

@ -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")

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"fmt"

View File

@ -1,4 +1,4 @@
package handlers_test
package integration_test
import (
"github.com/aclindsa/moneygo/internal/handlers"