Skip to content

Commit

Permalink
[Remove] old test and unused mock
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGalek committed Dec 19, 2024
1 parent f2c9bb8 commit 7d6ce16
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/diagoLatencyExtension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ import (
"time"
)

type mockDiagoPanelGenerator struct{}

func (m *mockDiagoPanelGenerator) GenerateDiagoPanelHTML(data struct{ Latency string }) (string, error) {
return "<div>Mocked HTML: " + data.Latency + "</div>", nil
}

func TestDiagoLatencyExtension(t *testing.T) {
latencyExtension := extensions.NewDiagoLatencyExtension()

Expand Down Expand Up @@ -154,20 +148,6 @@ func (m *mockInvalidTemplateProvider) GetDiagoLatencyPanelTemplate() string {
return "{{ .InvalidField"
}

/*
func TestGenerateDiagoPanelHTML_TemplateParseError2(t *testing.T) {
generator := extensions.NewDefaultPanelGenerator()
invalidTemplateProvider := &mockInvalidTemplateProvider{}
latencyData := extensions.LatencyData{Latency: "500 ms"}
result, err := generator.GenerateDiagoPanelHTML(invalidTemplateProvider, latencyData)
assert.Error(t, err, "Expected error while parsing template")
assert.Empty(t, result, "Expected empty result when parsing fails")
}
*/
func TestGenerateDiagoPanelHTML_TemplateExecuteError(t *testing.T) {
mockProvider := &mockTemplateProviderWithExecuteError{}

Expand Down

0 comments on commit 7d6ce16

Please sign in to comment.