From aa30d6aae180b8516629dfbac96897cb73463449 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Thu, 3 Oct 2019 12:43:46 +0200 Subject: [PATCH 1/3] add automatic test to proof failure --- test/y2ftp/clients/ftp_server_auto_test.rb | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/y2ftp/clients/ftp_server_auto_test.rb diff --git a/test/y2ftp/clients/ftp_server_auto_test.rb b/test/y2ftp/clients/ftp_server_auto_test.rb new file mode 100644 index 0000000..4995717 --- /dev/null +++ b/test/y2ftp/clients/ftp_server_auto_test.rb @@ -0,0 +1,40 @@ +#! /usr/bin/env rspec + +# Copyright (c) [2019] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +require_relative "../../spec_helper.rb" +require "y2ftp/clients/ftp_server_auto" + +describe Y2Ftp::Clients::FtpServerAuto do + subject { described_class.new } + + describe "#run" do + context "Summary argument" do + before do + allow(Yast::WFM).to receive(:Args).with(no_args).and_return(["Summary"]) + allow(Yast::WFM).to receive(:Args).with(0).and_return("Summary") + end + + it "returns string" do + expect(subject.run).to be_a(::String) + end + end + end +end From a175547e7f2cbcdefb53da4fc9ade975bbb72488 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Thu, 3 Oct 2019 12:45:13 +0200 Subject: [PATCH 2/3] fix wrong import --- src/lib/y2ftp/clients/ftp_server_auto.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/y2ftp/clients/ftp_server_auto.rb b/src/lib/y2ftp/clients/ftp_server_auto.rb index d70ed33..401c6dc 100644 --- a/src/lib/y2ftp/clients/ftp_server_auto.rb +++ b/src/lib/y2ftp/clients/ftp_server_auto.rb @@ -19,7 +19,7 @@ require "yast" -Yast.import "Yast::FtpServer" +Yast.import "FtpServer" module Y2Ftp module Clients From ba2c274e166c4a5423ba238a465469bc5e77baf0 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Thu, 3 Oct 2019 12:47:20 +0200 Subject: [PATCH 3/3] changes --- package/yast2-ftp-server.changes | 6 ++++++ package/yast2-ftp-server.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/yast2-ftp-server.changes b/package/yast2-ftp-server.changes index 7b2b365..7299deb 100644 --- a/package/yast2-ftp-server.changes +++ b/package/yast2-ftp-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 3 10:45:18 UTC 2019 - Josef Reidinger + +- Fix autoyast client (bsc#1149932) +- 4.1.8 + ------------------------------------------------------------------- Fri Jul 19 10:42:01 UTC 2019 - José Iván López González diff --git a/package/yast2-ftp-server.spec b/package/yast2-ftp-server.spec index dd830c9..e2b2265 100644 --- a/package/yast2-ftp-server.spec +++ b/package/yast2-ftp-server.spec @@ -17,7 +17,7 @@ Name: yast2-ftp-server -Version: 4.1.7 +Version: 4.1.8 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build