INNER CODE UNIT · Go

TestNullStringValue

oracle/oracle-db-appdev-monitoring · alertlog/alertlog_test.go:20

func TestNullStringValue(t *testing.T) {
	t.Run("returns string for valid value", func(t *testing.T) {
		got := nullStringValue(sql.NullString{String: "ecid-123", Valid: true})
		if got != "ecid-123" {
			t.Fatalf("expected valid null string to unwrap, got %q", got)
		}
	})

	t.Run("returns empty string for null value", func(t *testing.T) {
		got := nullStringValue(sql.NullString{})
		if got != "" {
			t.Fatalf("expected null string to convert to empty string, got %q", got)
		}
	})
}

func TestLogDestinationForDatabase(t *testing.T) {
	t.Run("returns shared destination when disabled", func(t *testing.T) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…