Skip to content

Commit

Permalink
Mock the InstFunctions module
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Dec 2, 2023
1 parent 9244b1b commit c6bbbf4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions service/lib/agama/dbus/y2dir/modules/InstFunctions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# lib/InstFunctions.rb

require "yast"

module Yast
# Replacement for the Yast::Package module
#
# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb
class InstFunctionsClass < Module
def main
puts "Loading mocked module #{__FILE__}"
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L56
def ignored_features
[]
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L83
def reset_ignored_features
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L91
def feature_ignored?(feature_name)
false
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L107
def second_stage_required?
false
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L137
def self_update_explicitly_enabled?
false
end
end

InstFunctions = InstFunctionsClass.new
InstFunctions.main
end

0 comments on commit c6bbbf4

Please sign in to comment.