Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
change upload folder format - must not use ":"
Browse files Browse the repository at this point in the history
Change-Id: Ia67d483d52eb3298dd19a70a8b38ccb087aa3e96
  • Loading branch information
theganyo committed Nov 29, 2018
1 parent 0194f31 commit 899f0bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions adapter/analytics/analytics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func TestPushAnalytics(t *testing.T) {
}
m.now = func() time.Time { return time.Unix(ts, 0) }
m.collectionInterval = 100 * time.Millisecond
uploadDir := fmt.Sprintf("date=%s/time=%s", m.now().Format("2006-01-02"), m.now().Format("15:04:00"))
uploadDir := fmt.Sprintf("date=%s/time=%s", m.now().Format("2006-01-02"), m.now().Format("15-04-00"))

sendRecords := map[string][]testRecordPush{
t1: {
Expand Down Expand Up @@ -355,7 +355,7 @@ func TestPushAnalyticsMultipleRecords(t *testing.T) {
}
m.now = func() time.Time { return time.Unix(ts, 0) }
m.collectionInterval = 100 * time.Millisecond
uploadDir := fmt.Sprintf("date=%s/time=%s", m.now().Format("2006-01-02"), m.now().Format("15:04:00"))
uploadDir := fmt.Sprintf("date=%s/time=%s", m.now().Format("2006-01-02"), m.now().Format("15-04-00"))

sendRecords := map[string][]testRecordPush{
t1: {{
Expand Down
2 changes: 1 addition & 1 deletion adapter/analytics/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@ func (m *manager) signedURL(subdir, filename string) (string, error) {
func (m *manager) uploadDir() string {
now := m.now()
d := now.Format("2006-01-02")
t := now.Format("15:04:00")
t := now.Format("15-04-00")
return fmt.Sprintf(pathFmt, d, t)
}

0 comments on commit 899f0bf

Please sign in to comment.