MCPcopy
hub / github.com/slimtoolkit/slim / AssertTargetAppLogsContain

Method AssertTargetAppLogsContain

pkg/test/e2e/sensor/sensor.go:682–693  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context, what ...string)

Source from the content-addressed store, hash-verified

680}
681
682func (s *Sensor) AssertTargetAppLogsContain(t *testing.T, ctx context.Context, what ...string) {
683 if len(s.contID) == 0 {
684 t.Fatal("Test sensor container hasn't been started yet")
685 }
686
687 contLogs := s.ContainerLogsOrFail(t, ctx)
688 for _, w := range what {
689 if strings.Index(contLogs, w) == -1 {
690 t.Errorf("Cannot find string %q in container logs", w)
691 }
692 }
693}
694
695func (s *Sensor) AssertTargetAppLogsEqualTo(t *testing.T, ctx context.Context, what string) {
696 if len(s.contID) == 0 {

Calls 1

ContainerLogsOrFailMethod · 0.95