diff testharness/src/lib.rs @ 104:a2676475e86b default tip

Create the very start of a test suite. - Creates a new testharness package - Sets up the outlines of a test suite that will execute there - A basic container where maybe those tests can execute
author Paul Fisher <paul@pfish.zone>
date Wed, 25 Jun 2025 16:56:56 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testharness/src/lib.rs	Wed Jun 25 16:56:56 2025 -0400
@@ -0,0 +1,19 @@
+//! The nonstick library
+extern crate nonstick;
+
+use nonstick::{pam_hooks, Flags, PamHandleModule, PamModule};
+use std::ffi::CStr;
+
+struct TestHarness;
+
+impl<M: PamHandleModule> PamModule<M> for TestHarness {
+    fn authenticate(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> {
+        Ok(())
+    }
+
+    fn account_management(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> {
+        Ok(())
+    }
+}
+
+pam_hooks!(TestHarness);