From 73797ce2d70f9513a520580a68b21cd54fe9f0d0 Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Fri, 28 Jun 2024 13:01:04 -0500 Subject: [PATCH] test commit --- README.md | 4 +++- lib/rubyqa.rb | 8 ++++---- lib/test | 7 +++++++ rubyqa.gemspec | 10 ++++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 rubyqa.gemspec diff --git a/README.md b/README.md index 0476ef2..eb416b4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ This is a framework/tool to organize & QA testing of a build of a remote node (l - [Design Doc](design.adoc) ## What is it's intended purpose? -This is meant to provide an all in one tooling for creating a QA framework for testing builds of a remote +This is meant to provide an all in one tooling for creating a QA framework for testing builds of a remote device over the network. + +This can be done with shells like bash, but only to a lesser degree of accuracy. This project seeks to provide a greater degree of accuracy in tests on ensuring that a host has been properly built by whatever tooling you use (puppet, jenkins, etc). diff --git a/lib/rubyqa.rb b/lib/rubyqa.rb index c34143b..a2189d5 100644 --- a/lib/rubyqa.rb +++ b/lib/rubyqa.rb @@ -1,7 +1,7 @@ #!/usr/bin/env ruby $LOAD_PATH << __dir__ -require 'manager.rb' -require 'resource.rb' -require 'host.rb' -require 'test.rb' +require 'manager' +require 'resource' +require 'host' +require 'test' diff --git a/lib/test b/lib/test index 223ad70..9806aa7 100644 --- a/lib/test +++ b/lib/test @@ -24,6 +24,13 @@ Manager.new_test("hostname in /etc/hosts", :cluster => true ) {|host| match_regex = /127\.0\.0\.1.+#{hostname.downcase}/ hosts.match? match_regex } + +Manager.new_test("Has user tristan") do |host| + passwd_file = host.exec("cat /etc/passwd") + passwd_file.match? /tristan.*/ +end + + $Manager.add_host(host) $Manager.run_tests $Manager.report diff --git a/rubyqa.gemspec b/rubyqa.gemspec new file mode 100644 index 0000000..12adab9 --- /dev/null +++ b/rubyqa.gemspec @@ -0,0 +1,10 @@ +Gem::Specification.new do |s| + s.name = "RubyQA" + s.version = '0.1.0' + s.summary = 'A Ruby framework for QA *NIX system builds' + s.description = 'A Ruby based framework defining & orchestrating tests against a host or hosts' + s.authors = ['Tristan Ancelet'] + s.email = 'tristanancelet@yahoo.com' + s.homepatge = 'https://git.arcanium.tech/tristan/RubyQA' + s.files = Dir.glob('lib/*.rb') +end