class Serverspec::Type::DockerSecret
Public Instance Methods
data()
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 14 def data @data ||= Base64.decode64(data64) end
data64()
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 22 def data64 inspection['Spec']['Data'] end
exist?()
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 6 def exist? get_inspection.success? end
has_data64?(data)
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 18 def has_data64?(data) data64 == data end
has_data?(data)
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 10 def has_data?(data) self.data == data end
has_label?(label, value = nil)
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 30 def has_label?(label, value = nil) if value label(label)[1] == value else label(label) end end
has_name?(name)
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 42 def has_name?(name) self.name == name end
label(label)
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 38 def label(label) labels.find { |key, _val| key == label } end
labels()
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 26 def labels inspection['Spec']['Labels'] end
name()
click to toggle source
# File lib/serverspec_extra_types/types/docker_secret.rb, line 46 def name inspection['Spec']['Name'] end
Private Instance Methods
get_inspection()
click to toggle source
rubocop:disable Naming/AccessorMethodName
# File lib/serverspec_extra_types/types/docker_secret.rb, line 53 def get_inspection @get_inspection ||= @runner.run_command("docker secret inspect #{@name}") end