Skip to content

Commit

Permalink
reenabled and fixed video-metadata collection
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacshuni committed Feb 9, 2018
1 parent 0e04fc6 commit 458d0ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
scopeMetadata = "metadata"
collectionV1Metadata = "v1-metadata"
cmsNotifier = "cms-notifier"
cmsMetadataNotifier = "cms-metadata-notifier"
)

type targetSystem struct {
Expand Down Expand Up @@ -50,15 +51,15 @@ var defaultCollections = map[string]targetSystem{
"v1-metadata": {
name: "v1-metadata",
originSystemID: "methode-web-pub",
notifierApp: "cms-metadata-notifier",
notifierApp: cmsMetadataNotifier,
scope: scopeMetadata,
},
"next-video-editor": {
name: "video-metadata",
originSystemID: "next-video-editor",
notifierApp: cmsMetadataNotifier,
scope: scopeMetadata,
},
// "next-video-editor": {
// name: "next-video-editor",
// originSystemID: "video-metadata",
// notifierApp: "cms-metadata-notifier",
// scope: scopeMetadata,
// },
}

func main() {
Expand Down
4 changes: 2 additions & 2 deletions uuidCollectionRepublisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestRepublishErrNative_Err(t *testing.T) {
mockedNativeStoreClient := new(mockNativeStoreClient)
mockedNativeStoreClient.On("GetNative", "methode", "f3b3b579-732b-4323-affa-a316aacad213", "tid_123").Return([]byte("native"), false, fmt.Errorf("Error 401 on native client"))
mockedNotifierClient := new(mockNotifierClient)
republisher := newNotifyingUCRepublisher(mockedNotifierClient, mockedNativeStoreClient, 500*time.Millisecond)
republisher := newNotifyingUCRepublisher(mockedNotifierClient, mockedNativeStoreClient, time.Second)
collection := targetSystem{
name: "methode",
originSystemID: "methode-web-pub",
Expand All @@ -77,7 +77,7 @@ func TestRepublishErrNative_Err(t *testing.T) {
assert.Error(t, fmt.Errorf("Error 401 on native client"), err)
assert.False(t, wasFound)
assert.Nil(t, msg)
assert.True(t, time.Now().UnixNano()-start.UnixNano() < 400000, "The time limter should have no effect on native client.")
assert.True(t, time.Now().UnixNano()-start.UnixNano() < 950000, "The time limter should have no effect on native client.")
}

func TestRepublishErrNotifier_Err(t *testing.T) {
Expand Down

0 comments on commit 458d0ab

Please sign in to comment.