class Capsium::Package::Testing::ConfigTest
A βconfigβ test (05x-testing): the configuration file must exist in the package and parse as the declared format (json or yaml). The known Capsium package configs (metadata.json, manifest.json, routes.json, storage.json, security.json) are additionally validated against their canonical models.
Constants
- FORMATS
Attributes
config_file
[R]
String
format
[R]
String
Public Class Methods
(name: String name, format: String format, config_file: String config_file) → void
Source
# File lib/capsium/package/testing/config_test.rb, line 19 def initialize(name:, format:, config_file:) super(name: name) @format = format @config_file = config_file end
Calls superclass method
Public Instance Methods
(Context context) → TestCase::Result
Source
# File lib/capsium/package/testing/config_test.rb, line 25 def run(context) problems = config_problems(context) Result.new(name: name, ok: problems.empty?, messages: problems) end