Start anew

This commit is contained in:
Alexander
2026-06-18 23:15:11 +02:00
parent 05b83364df
commit 83ff042b91
109 changed files with 0 additions and 30964 deletions
-90
View File
@@ -1,90 +0,0 @@
use std::process::Command;
#[test]
#[ignore]
fn test_mpv_playback() {
let mountpoint = setup_test_mount();
let output = Command::new("mpv")
.args([
"--no-video",
"--no-audio",
"--length=2",
"--msg-level=all=debug",
&format!("{}/Artist/Album/01 - Track.flac", mountpoint),
])
.output()
.expect("mpv must be installed");
assert!(
output.status.success(),
"mpv playback failed: {:?}",
output
);
}
#[test]
#[ignore]
fn test_vlc_playback() {
let mountpoint = setup_test_mount();
let output = Command::new("cvlc")
.args([
"--play-and-exit",
"--run-time=2",
&format!("{}/Artist/Album/", mountpoint),
])
.output()
.expect("vlc must be installed");
assert!(output.status.success(), "VLC playback failed");
}
#[test]
#[ignore]
fn test_file_manager_operations() {
let mountpoint = setup_test_mount();
let entries: Vec<_> = std::fs::read_dir(&mountpoint)
.expect("read_dir failed")
.collect();
assert!(!entries.is_empty(), "mountpoint should have entries");
for entry in entries {
let entry = entry.expect("entry should be valid");
let metadata = entry.metadata().expect("metadata should work");
assert!(metadata.is_dir() || metadata.is_file());
}
}
#[test]
#[ignore]
fn test_concurrent_player_access() {
let mountpoint = setup_test_mount();
let handles: Vec<_> = (0..3)
.map(|i| {
let mp = mountpoint.clone();
std::thread::spawn(move || {
Command::new("mpv")
.args([
"--no-video",
"--no-audio",
"--length=1",
&format!("{}/Artist/Album/0{} - Track.flac", mp, i + 1),
])
.output()
})
})
.collect();
for handle in handles {
let output = handle.join().unwrap().expect("mpv should run");
assert!(output.status.success());
}
}
fn setup_test_mount() -> String {
std::env::var("MUSICFS_TEST_MOUNT").unwrap_or_else(|_| "/tmp/musicfs-test".to_string())
}
-40
View File
@@ -1,40 +0,0 @@
services:
toxiproxy:
image: ghcr.io/shopify/toxiproxy:2.9.0
ports:
- "8474:8474"
- "20000-20010:20000-20010"
healthcheck:
test: ["CMD", "/toxiproxy-cli", "list"]
interval: 5s
timeout: 3s
retries: 3
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: test
MINIO_ROOT_PASSWORD: testtest123
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 3
volumes:
- minio-data:/data
sftp:
image: atmoz/sftp:latest
ports:
- "2222:22"
command: test:test:::music
volumes:
- sftp-data:/home/test/music
volumes:
minio-data:
sftp-data: