initial commit

This commit is contained in:
tumillanino
2025-11-12 18:34:08 +11:00
commit 2fed8f268e
585 changed files with 161655 additions and 0 deletions

43
main_test.go Normal file
View File

@@ -0,0 +1,43 @@
package main
import (
"os"
"testing"
)
func TestMiasmaInstallerCreation(t *testing.T) {
installer := NewMiasmaInstaller()
if installer == nil {
t.Error("NewMiasmaInstaller() should not return nil")
}
if !installer.installHardened {
t.Error("installHardened should be true by default")
}
if len(installer.installPackages) != 0 {
t.Error("installPackages should be empty by default")
}
}
func TestCreateTempConfig(t *testing.T) {
installer := NewMiasmaInstaller()
installer.device = "/dev/sda"
installer.username = "testuser"
installer.password = "testpassword"
// Create temporary config file
err := installer.createTempConfig()
if err != nil {
t.Errorf("createTempConfig() failed: %v", err)
}
// Check if file was created
if _, err := os.Stat("alis.conf"); os.IsNotExist(err) {
t.Error("alis.conf file was not created")
}
// Clean up
os.Remove("alis.conf")
}