1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 07:33:21 -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 - touch $GOPATH/src/github.com/aclindsa/moneygo/internal/handlers/cusip_list.csv
# Build and test MoneyGo # Build and test MoneyGo
- go generate -v github.com/aclindsa/moneygo/internal/handlers - 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 # Report the test coverage
after_script: after_script:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
package handlers_test package integration_test
import ( import (
"github.com/aclindsa/moneygo/internal/models" "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 // 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) t.Fatalf("Error importing from Gnucash: %s\n", err)
} }

View File

@ -1,4 +1,4 @@
package handlers_test package integration_test
import ( import (
"fmt" "fmt"
@ -28,12 +28,12 @@ func TestImportOFXChecking(t *testing.T) {
} }
// Import and ensure it didn't return a nasty error code // 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) t.Fatalf("Error importing OFX: %s\n", err)
} }
accountBalanceHelper(t, d.clients[0], &d.accounts[1], "2493.19") 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) t.Fatalf("Error importing OFX: %s\n", err)
} }
accountBalanceHelper(t, d.clients[0], &d.accounts[1], "5336.27") 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 // 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) t.Fatalf("Error importing OFX: %s\n", err)
} }
accountBalanceHelper(t, d.clients[0], &d.accounts[7], "-4.49") 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 // 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) t.Fatalf("Error importing OFX: %s\n", err)
} }
accountBalanceHelper(t, d.clients[0], account, "-192.10") 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 // 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) t.Fatalf("Error importing OFX: %s\n", err)
} }
accountBalanceHelper(t, d.clients[0], account, "387.48") accountBalanceHelper(t, d.clients[0], account, "387.48")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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