Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tybritten committed Jan 8, 2020
1 parent dfbc356 commit 20c8361
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions archiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func TestGetMissingDayArchives(t *testing.T) {

// get the tasks for our org
ctx := context.Background()
orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)

now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)
Expand Down Expand Up @@ -65,7 +66,8 @@ func TestGetMissingMonthArchives(t *testing.T) {

// get the tasks for our org
ctx := context.Background()
orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)

now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)
Expand Down Expand Up @@ -96,7 +98,8 @@ func TestCreateMsgArchive(t *testing.T) {
err := EnsureTempArchiveDirectory("/tmp")
assert.NoError(t, err)

orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)
now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)

Expand Down Expand Up @@ -172,7 +175,8 @@ func TestCreateRunArchive(t *testing.T) {
err := EnsureTempArchiveDirectory("/tmp")
assert.NoError(t, err)

orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)
now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)

Expand Down Expand Up @@ -228,7 +232,8 @@ func TestWriteArchiveToDB(t *testing.T) {
db := setup(t)
ctx := context.Background()

orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)
now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)

Expand Down Expand Up @@ -281,11 +286,11 @@ func TestArchiveOrgMessages(t *testing.T) {
ctx := context.Background()
deleteTransactionSize = 1

orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)
now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)

config := NewConfig()
os.Args = []string{"rp-archiver"}

loader := ezconf.NewLoader(&config, "archiver", "Archives RapidPro runs and msgs to S3", nil)
Expand Down Expand Up @@ -422,11 +427,11 @@ func TestArchiveOrgRuns(t *testing.T) {
db := setup(t)
ctx := context.Background()

orgs, err := GetActiveOrgs(ctx, db)
config := NewConfig()
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)
now := time.Date(2018, 1, 8, 12, 30, 0, 0, time.UTC)

config := NewConfig()
os.Args = []string{"rp-archiver"}

loader := ezconf.NewLoader(&config, "archiver", "Archives RapidPro runs and msgs to S3", nil)
Expand Down

0 comments on commit 20c8361

Please sign in to comment.