Skip to content

Commit

Permalink
add missing key to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tybritten committed Oct 10, 2022
1 parent c7bbe3a commit 63d6363
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion archives/archives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ func TestGetMissingDayArchives(t *testing.T) {
// get the tasks for our org
ctx := context.Background()
config := NewDefaultConfig()
config.AWSAccessKeyID = "test"
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"

orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)

Expand Down Expand Up @@ -86,6 +88,8 @@ func TestGetMissingMonthArchives(t *testing.T) {
// get the tasks for our org
ctx := context.Background()
config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
orgs, err := GetActiveOrgs(ctx, db, config)
assert.NoError(t, err)

Expand Down Expand Up @@ -119,6 +123,8 @@ func TestCreateMsgArchive(t *testing.T) {
assert.NoError(t, err)

config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
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 @@ -196,6 +202,8 @@ func TestCreateRunArchive(t *testing.T) {
assert.NoError(t, err)

config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
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 @@ -253,6 +261,8 @@ func TestWriteArchiveToDB(t *testing.T) {
ctx := context.Background()

config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
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 @@ -307,6 +317,8 @@ func TestArchiveOrgMessages(t *testing.T) {
deleteTransactionSize = 1

config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
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 @@ -426,6 +438,8 @@ func TestArchiveOrgRuns(t *testing.T) {
ctx := context.Background()

config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"
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 @@ -515,6 +529,8 @@ func TestArchiveOrgRuns(t *testing.T) {
func TestArchiveActiveOrgs(t *testing.T) {
db := setup(t)
config := NewDefaultConfig()
config.AWSAccessKeyID = "missing_aws_access_key_id"
config.AWSSecretAccessKey = "missing_aws_secret_access_key"

os.Args = []string{"rp-archiver"}
loader := ezconf.NewLoader(&config, "archiver", "Archives RapidPro runs and msgs to S3", nil)
Expand Down

0 comments on commit 63d6363

Please sign in to comment.