From ea5752a7b3a2572cbf92c49a64a23c5d911249f5 Mon Sep 17 00:00:00 2001 From: Fabian Simon Date: Mon, 23 Sep 2019 13:36:51 +0200 Subject: [PATCH] fix tests --- ...stats_info_container_has_no_funk_labels_and_is_swarmmode | 6 ++++-- ...s_and_is_swarmmode_but_container_has_label_not_log_stats | 3 ++- ...s_no_stats_container_has_no_funk_labels_and_is_swarmmode | 3 ++- ...s_no_stats_container_has_no_funk_labels_and_no_swarmmode | 3 ++- tracker/trackStuff_test.go | 1 - 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode b/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode index c3eaea9..6fe04ed 100644 --- a/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode +++ b/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode @@ -13,7 +13,8 @@ Servicename: (string) (len=29) "com.docker.swarm.service.name", Namespace: (string) (len=26) "com.docker.stack.namespace", ContainerID: (string) (len=18) "mockContainer-0001" - } + }, + StaticContent: (string) (len=2) "{}" }, (main.Message) { Time: (time.Time) 1974-05-19 01:02:03.000000004 +0000 UTC, @@ -28,6 +29,7 @@ Servicename: (string) (len=29) "com.docker.swarm.service.name", Namespace: (string) (len=26) "com.docker.stack.namespace", ContainerID: (string) (len=18) "mockContainer-0001" - } + }, + StaticContent: (string) (len=2) "{}" } } diff --git a/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode_but_container_has_label_not_log_stats b/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode_but_container_has_label_not_log_stats index 5d7416a..50e4c19 100644 --- a/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode_but_container_has_label_not_log_stats +++ b/.snapshots/TestHolder_SaveTrackingInfo-Send_logs_and_stats_info_container_has_no_funk_labels_and_is_swarmmode_but_container_has_label_not_log_stats @@ -13,6 +13,7 @@ Servicename: (string) (len=29) "com.docker.swarm.service.name", Namespace: (string) (len=26) "com.docker.stack.namespace", ContainerID: (string) (len=18) "mockContainer-0001" - } + }, + StaticContent: (string) (len=2) "{}" } } diff --git a/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_is_swarmmode b/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_is_swarmmode index 5d7416a..50e4c19 100644 --- a/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_is_swarmmode +++ b/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_is_swarmmode @@ -13,6 +13,7 @@ Servicename: (string) (len=29) "com.docker.swarm.service.name", Namespace: (string) (len=26) "com.docker.stack.namespace", ContainerID: (string) (len=18) "mockContainer-0001" - } + }, + StaticContent: (string) (len=2) "{}" } } diff --git a/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_no_swarmmode b/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_no_swarmmode index 7fd1065..3798b01 100644 --- a/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_no_swarmmode +++ b/.snapshots/TestHolder_SaveTrackingInfo-Send_only_logs_no_stats_container_has_no_funk_labels_and_no_swarmmode @@ -13,6 +13,7 @@ Servicename: (string) "", Namespace: (string) "", ContainerID: (string) (len=18) "mockContainer-0001" - } + }, + StaticContent: (string) (len=2) "{}" } } diff --git a/tracker/trackStuff_test.go b/tracker/trackStuff_test.go index 10160d6..9be9cf5 100644 --- a/tracker/trackStuff_test.go +++ b/tracker/trackStuff_test.go @@ -185,7 +185,6 @@ func TestNewTracker_Logs(t *testing.T) { want []TrackerLogs }{ { - name: "Check that will returns the logjson", resultLogs: `{"mock":true}`, resultContainer: `{"mock":true}`, container: types.Container{