Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/main"
cmd = "go mod tidy && go build -o ./tmp/main ."
cmd = "go mod tidy && go build -o ./tmp/main ./cmd/simplenvr"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepared-export-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Protocol regressions and real HTTPS/browser acceptance
run: |
. "$RUNNER_TEMP/export-browser-venv/bin/activate"
python -m unittest discover -s tests -p 'test_prepared_export_protocol.py' -v
GITHUB_SHA="$CHECKPOINT_SHA" bash tests/runtime-browser-acceptance.sh simplenvr-export-test "$RUNNER_TEMP/prepared-export-browser"
python -m unittest discover -s tests/acceptance -p 'test_prepared_export_protocol.py' -v
GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/runtime-browser-acceptance.sh simplenvr-export-test "$RUNNER_TEMP/prepared-export-browser"
- name: Retain media, network, browser and container evidence
if: always()
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepared-export-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
- run: bash .github/scripts/ci-media-apt.sh update
- run: bash .github/scripts/ci-media-apt.sh install ffmpeg
- name: Prepared protocol regression tests
run: python3 -m unittest discover -s tests -p 'test_prepared_export_protocol.py' -v
run: python3 -m unittest discover -s tests/acceptance -p 'test_prepared_export_protocol.py' -v
- name: Verify dependencies and build the exact checkout
run: |
go mod download
go mod verify
git diff --exit-code -- go.mod go.sum
go build ./...
- name: Full race-enabled Go suite including Node and native media tests
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/core-ci-evidence.sh "$RUNNER_TEMP/prepared-export-go"
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/core-ci-evidence.sh "$RUNNER_TEMP/prepared-export-go"
- name: Static analysis
if: always()
run: go vet ./...
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/safety-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
persist-credentials: false
- name: Browser CI diagnostic helper regression tests
run: |
python3 -m unittest discover -s tests -p 'test_browser_ci_diagnostics.py' -v
python3 -m unittest discover -s tests -p 'test_browser_network_ready.py' -v
python3 -m unittest discover -s tests/acceptance -p 'test_browser_ci_diagnostics.py' -v
python3 -m unittest discover -s tests/acceptance -p 'test_browser_network_ready.py' -v
- uses: actions/setup-go@v5
with:
go-version: '1.26.x'
Expand All @@ -51,10 +51,10 @@ jobs:
- name: Build
run: go build ./...
- name: Core evidence assessor regression tests
run: python3 -m unittest discover -s tests -p 'test_core_ci_evidence.py' -v
run: python3 -m unittest discover -s tests/acceptance -p 'test_core_ci_evidence.py' -v
- name: Race-enabled tests including media and shutdown lifecycle
shell: bash
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/core-ci-evidence.sh "$RUNNER_TEMP/simplenvr-core-evidence"
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/core-ci-evidence.sh "$RUNNER_TEMP/simplenvr-core-evidence"
- name: Retain core test execution evidence even on failure
if: always()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
run: docker build -t simplenvr-safety-test .
- name: Active runtime-container recording, SIGTERM and restart intent
shell: bash
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/active-container-storage.sh simplenvr-safety-test
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/active-container-storage.sh simplenvr-safety-test
- name: Runtime container SIGTERM smoke test
shell: bash
run: |
Expand All @@ -126,7 +126,7 @@ jobs:
- name: Runtime export backpressure, disconnect, SIGTERM and restart
timeout-minutes: 6
shell: bash
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/runtime-export-acceptance.sh simplenvr-safety-test "$RUNNER_TEMP/simplenvr-export-evidence"
run: GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/runtime-export-acceptance.sh simplenvr-safety-test "$RUNNER_TEMP/simplenvr-export-evidence"
- name: Retain runtime-export evidence even on failure
if: always()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
run: |
set -euo pipefail
. "$RUNNER_TEMP/simplenvr-browser-venv/bin/activate"
GITHUB_SHA="$CHECKPOINT_SHA" bash tests/runtime-browser-acceptance.sh simplenvr-safety-test "$RUNNER_TEMP/simplenvr-browser-evidence"
GITHUB_SHA="$CHECKPOINT_SHA" bash tests/acceptance/runtime-browser-acceptance.sh simplenvr-safety-test "$RUNNER_TEMP/simplenvr-browser-evidence"
- name: Retain runtime-browser acceptance evidence
if: always()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
go mod download
go mod verify
git diff --exit-code -- go.mod go.sum
go test -c -o "$RUNNER_TEMP/correspondence-resource.test" .
go test -c -o "$RUNNER_TEMP/correspondence-resource.test" ./cmd/simplenvr
- name: Measure longer generated recordings and existing ceiling refusal
timeout-minutes: 8
shell: bash
Expand All @@ -238,13 +238,13 @@ jobs:
git diff --exit-code -- go.mod go.sum
- name: Evidence assessment regression tests
if: always()
run: python3 -m unittest discover -s tests -p 'test_correspondence_assessment.py' -v
run: python3 -m unittest discover -s tests/acceptance -p 'test_correspondence_assessment.py' -v
- name: Assess full adapter and native prebuffer evidence
if: always()
shell: bash
run: |
set -euo pipefail
python3 tests/correspondence_assessment.py "$RUNNER_TEMP/correspondence-resources" \
python3 tests/acceptance/correspondence_assessment.py "$RUNNER_TEMP/correspondence-resources" \
--expected-head "$CHECKPOINT_SHA" \
--output "$RUNNER_TEMP/correspondence-resources/assessment.json" \
--summary "$RUNNER_TEMP/correspondence-resources/assessment.md"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/tmp
eventburp.sh
/simplenvr
__pycache__/
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ ENV GOFLAGS=-mod=readonly
COPY go.mod go.sum ./
RUN sha256sum go.mod go.sum > /tmp/dependencies.sha256 && go mod download && go mod verify && sha256sum -c /tmp/dependencies.sha256
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -o simplenvr . && sha256sum -c /tmp/dependencies.sha256
RUN CGO_ENABLED=0 go build -trimpath -o simplenvr ./cmd/simplenvr && sha256sum -c /tmp/dependencies.sha256

# Runtime base pinned by digest; update deliberately and re-run Safety verification.
FROM alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf
RUN apk add --no-cache ffmpeg ca-certificates && ffmpeg -hide_banner -encoders 2>/dev/null | grep -q '[[:space:]]libx264[[:space:]]'
WORKDIR /app
COPY --from=builder /app/simplenvr /app/simplenvr
COPY --from=builder /app/templates /app/templates
COPY --from=builder /app/static /app/static
COPY --from=builder /app/web/templates /app/web/templates
COPY --from=builder /app/web/static /app/web/static
EXPOSE 443
STOPSIGNAL SIGTERM
ENTRYPOINT ["/app/simplenvr"]
25 changes: 1 addition & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,7 @@ SimpleNVR records RTSP cameras with FFmpeg. Use the web interface to manage came

Use the image from GitHub Container Registry. The example defaults to `v0.2.2`, which includes built-in authentication and server-prepared exports. An image's release workflow must finish publishing before it can be pulled.

Save as `compose.yaml`:

```yaml
services:
simplenvr:
image: ghcr.io/mouldybread/simplenvr:${SIMPLENVR_VERSION:-v0.2.2}
restart: unless-stopped
ports:
- "127.0.0.1:8443:443"
environment:
NVR_EXPORT_SCRATCH_DIR: /exports
volumes:
- type: bind
source: ./recordings
target: /recordings
bind:
create_host_path: false
- type: bind
source: ./exports
target: /exports
bind:
create_host_path: false
- ./certs:/certs
```
The example Compose file is [docs/compose/compose.yaml](docs/compose/compose.yaml). Copy it into your install directory as `compose.yaml` before running the commands below, because its `./recordings`, `./exports` and `./certs` paths are relative to the Compose file.

Optionally set `SIMPLENVR_VERSION` in `.env` to another published version that supports these features. Unlike the old example, this Compose file actually uses that setting.

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type dashboardRoute struct {
path string
}

// Requests the dashboard issues, taken from static/js/*.js and the routes
// Requests the dashboard issues, taken from web/static/js/*.js and the routes
// registered in main.go. /auth/session is covered by the probe tests.
var dashboardRoutes = []dashboardRoute{
{"index", "GET", "/"},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendCameraRemovalConfirmation(t *testing.T) {
runFrontendRegression(t, "tests/camera-removal-confirmation.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/camera-removal-confirmation.cjs", "UTC")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// nonredirected HTTP 200 text/html fragment with no document-level tags, so the
// served empty state must satisfy that contract rather than look ambiguous.
func TestCameraListEmptyStateSatisfiesRemovalResponseContract(t *testing.T) {
parsed, err := template.ParseGlob("templates/*.html")
parsed, err := template.ParseGlob("web/templates/*.html")
if err != nil {
t.Fatal(err)
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestContinuousUpstreamFailureAndCameraResponse(t *testing.T) {
defer func(){nvr=oldNVR;templates=oldTemplates}()
nvr=&NVR{cameras:map[string]*Camera{cam.ID:cam,other.ID:other},cameraOrder:[]string{cam.ID,other.ID}}
var parseErr error
templates,parseErr=template.ParseFiles("templates/cameras.html")
templates,parseErr=template.ParseFiles("web/templates/cameras.html")
if parseErr!=nil {t.Fatal(parseErr)}
w:=httptest.NewRecorder();camerasHandler(w,httptest.NewRequest("GET","https://nvr.test/api/cameras",nil))
if w.Code!=200 || strings.Count(w.Body.String(),`class="camera-recording-error"`)!=1 || !strings.Contains(w.Body.String(),"DESCRIBE 404") {t.Fatalf("%d %s",w.Code,w.Body.String())}
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestContinuousTimeoutOnlyReportsCaptureDeadline(t *testing.T) {
}

func TestRecordSegmentFreezesCaptureOutcomeBeforePublication(t *testing.T) {
raw,err:=os.ReadFile("recorder.go");if err!=nil {t.Fatal(err)}
raw,err:=os.ReadFile("cmd/simplenvr/recorder.go");if err!=nil {t.Fatal(err)}
source:=string(raw)
start,end:=strings.Index(source,"func recordSegment("),strings.Index(source,"func sanitizeFilename(")
if start<0 || end<=start {t.Fatal("recordSegment not found")}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendEventClearConfirmation(t *testing.T) {
runFrontendRegression(t, "tests/event-clear-confirmation.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/event-clear-confirmation.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import "testing"

func TestPreparedExportModeUI(t *testing.T) {
for _,zone:=range []string{"UTC","America/Chicago"} {
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/export-mode-ui.cjs",zone)})
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/frontend/export-mode-ui.cjs",zone)})
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import "testing"

func TestPreparedExportQueueDetailsUI(t *testing.T) {
for _,zone:=range []string{"UTC","America/Chicago"} {
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/export-queue-details.cjs",zone)})
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/frontend/export-queue-details.cjs",zone)})
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import "testing"

func TestExportRangeControlsFrontend(t *testing.T) {
for _,zone:=range []string{"UTC","America/Chicago"} {
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/export-range-controls.cjs",zone)})
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/frontend/export-range-controls.cjs",zone)})
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ func runFrontendRegression(t *testing.T,script,zone string) {
if err!=nil {t.Fatalf("frontend regressions failed (%s, %s): %v\n%s",script,zone,err,output)}
}

func TestFrontendEventRendering(t *testing.T) {runFrontendRegression(t,"tests/event-rendering.cjs","UTC")}
func TestFrontendExportUI(t *testing.T) {runFrontendRegression(t,"tests/export-ui.cjs","UTC")}
func TestFrontendEventRendering(t *testing.T) {runFrontendRegression(t,"tests/frontend/event-rendering.cjs","UTC")}
func TestFrontendExportUI(t *testing.T) {runFrontendRegression(t,"tests/frontend/export-ui.cjs","UTC")}
func TestFrontendEventNavigation(t *testing.T) {
for _,zone:=range []string{"UTC","Asia/Hong_Kong","America/Chicago"} {
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/event-navigation.cjs",zone)})
t.Run(zone,func(t *testing.T){runFrontendRegression(t,"tests/frontend/event-navigation.cjs",zone)})
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func TestNoLegacyDownloadCallsInAssets(t *testing.T) {
legacy:=regexp.MustCompile(`\bfunction\s+startDownload\b|\bstartDownload\s*\(|=\s*startDownload\b|\b(?:window|globalThis)\s*(?:\.\s*startDownload\b|\[\s*['"]startDownload['"]\s*\])`)
for _,root:=range []string{"static","templates"} {
for _,root:=range []string{"web/static","web/templates"} {
err:=filepath.WalkDir(root,func(path string,entry fs.DirEntry,walkErr error) error {
if walkErr!=nil {return walkErr}
if entry.IsDir() {return nil}
Expand All @@ -23,10 +23,10 @@ func TestNoLegacyDownloadCallsInAssets(t *testing.T) {
})
if err!=nil {t.Fatal(err)}
}
playback,err:=func()([]byte,error){var all []byte;for _,p:=range []string{"static/js/playback-state.js","static/js/playback-camera-date.js","static/js/playback-timeline-load.js","static/js/playback-canvas.js","static/js/playback-seek-session.js","static/js/playback-video-controls.js"}{b,e:=os.ReadFile(p);if e!=nil{return nil,e};all=append(all,b...)};return all,nil}();if err!=nil {t.Fatal(err)}
playback,err:=func()([]byte,error){var all []byte;for _,p:=range []string{"web/static/js/playback-state.js","web/static/js/playback-camera-date.js","web/static/js/playback-timeline-load.js","web/static/js/playback-canvas.js","web/static/js/playback-seek-session.js","web/static/js/playback-video-controls.js"}{b,e:=os.ReadFile(p);if e!=nil{return nil,e};all=append(all,b...)};return all,nil}();if err!=nil {t.Fatal(err)}
if bytes.Contains(playback,[]byte("/api/download")) {t.Fatal("playback module must not retain a direct export-request path")}
page,err:=os.ReadFile("templates/index.html");if err!=nil {t.Fatal(err)}
page,err:=os.ReadFile("web/templates/index.html");if err!=nil {t.Fatal(err)}
if !bytes.Contains(page,[]byte(`onclick="startExportDownloads()"`)) {t.Fatal("monitored export entry point is not wired to the page")}
}

func TestFrontendDownloadEntryPoints(t *testing.T) {runFrontendRegression(t,"tests/download-entrypoints.cjs","UTC")}
func TestFrontendDownloadEntryPoints(t *testing.T) {runFrontendRegression(t,"tests/frontend/download-entrypoints.cjs","UTC")}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendLiveStreamNames(t *testing.T) {
runFrontendRegression(t, "tests/live-stream-names.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/live-stream-names.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions main.go → cmd/simplenvr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func main() {
// Saving new session settings asks for the same graceful shutdown as SIGTERM;
// the container's restart policy then starts the process again.
auth.restart=stopSignals
templates,err=template.ParseGlob("templates/*.html");if err!=nil {log.Fatal("Failed to load templates: ",err)}
templates,err=template.ParseGlob("web/templates/*.html");if err!=nil {log.Fatal("Failed to load templates: ",err)}
if err=nvr.load();err!=nil {log.Fatal("Refusing startup with invalid camera configuration: ",err)}
log.Printf("Loaded %d cameras from disk",len(nvr.cameras))
recoverBeforeStartup(appCtx,nvr)
Expand Down Expand Up @@ -138,7 +138,7 @@ func main() {
http.HandleFunc("/api/events/clear-all",clearAllEventsHandler)
http.HandleFunc("/api/events/clear-camera",clearCameraEventsHandler)
http.HandleFunc("/api/recordings/cleanup-orphaned",cleanupOrphanedRecordingsHandler)
http.Handle("/static/",http.StripPrefix("/static/",http.FileServer(http.Dir("static"))))
http.Handle("/static/",http.StripPrefix("/static/",http.FileServer(http.Dir("web/static"))))
http.HandleFunc("/",indexHandler)
gate:=newShutdownGate(themedLoginPage(auth.Handler(exports.Handler(http.DefaultServeMux))))
gate.startBackgroundJob(exports.runLifecycle)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendOrphanCleanupReporting(t *testing.T) {
runFrontendRegression(t, "tests/orphan-cleanup-reporting.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/orphan-cleanup-reporting.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendPersistenceResponses(t *testing.T) {
runFrontendRegression(t, "tests/persistence-responses.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/persistence-responses.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "testing"
func TestFrontendPlaybackContinuation(t *testing.T) {
for _, zone := range []string{"UTC", "Asia/Hong_Kong", "America/Chicago"} {
t.Run(zone, func(t *testing.T) {
runFrontendRegression(t, "tests/playback-continuation.cjs", zone)
runFrontendRegression(t, "tests/frontend/playback-continuation.cjs", zone)
})
}
}
8 changes: 8 additions & 0 deletions cmd/simplenvr/playback_controls_frontend_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

import "testing"

func TestFrontendPlaybackControls(t *testing.T) {
runFrontendRegression(t, "tests/frontend/playback-controls.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/playback-controls.cjs", "America/Chicago")
}
8 changes: 8 additions & 0 deletions cmd/simplenvr/playback_failures_frontend_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

import "testing"

func TestFrontendPlaybackFailures(t *testing.T) {
runFrontendRegression(t, "tests/frontend/playback-failures.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/playback-failures.cjs", "America/Chicago")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendPlaybackLifecycle(t *testing.T) {
runFrontendRegression(t, "tests/playback-lifecycle.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/playback-lifecycle.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendRecordingDeletionConfirmation(t *testing.T) {
runFrontendRegression(t, "tests/recording-deletion-confirmation.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/recording-deletion-confirmation.cjs", "UTC")
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func TestCameraTemplateRecordingStatus(t *testing.T) {
tmpl,err:=template.ParseFiles("templates/cameras.html")
tmpl,err:=template.ParseFiles("web/templates/cameras.html")
if err!=nil {t.Fatal(err)}
failure:=continuousRecordingNotice{Code:"upstream_rtsp_unavailable",Message:"Could not open upstream stream",Detail:"DESCRIBE 404",PublicationMessage:"Check recording storage",Retrying:true}
notRetrying:=failure;notRetrying.Retrying=false
Expand Down Expand Up @@ -59,7 +59,7 @@ func TestCameraTemplateRecordingStatus(t *testing.T) {
}

func TestCameraTemplateRecordingRecoveryAndEscaping(t *testing.T) {
tmpl,err:=template.ParseFiles("templates/cameras.html");if err!=nil {t.Fatal(err)}
tmpl,err:=template.ParseFiles("web/templates/cameras.html");if err!=nil {t.Fatal(err)}
view:=map[string]interface{}{
"ID":"test","Name":"Test camera","RTSPUrl":"","RecordDir":"/recordings/test","DiskUsage":"0 B",
"IsRecording":true,"RecordingMode":ModeContinuous,"ModeDisplay":"Continuous","RetentionDisplay":7,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "testing"

func TestFrontendSessionExpiry(t *testing.T) {
runFrontendRegression(t, "tests/session-expiry.cjs", "UTC")
runFrontendRegression(t, "tests/frontend/session-expiry.cjs", "UTC")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading