From 5826beca57a2ed623c6fd801dc638c6f8710fd1a Mon Sep 17 00:00:00 2001 From: Flaviu Mates Date: Fri, 19 Feb 2021 12:19:40 +0200 Subject: [PATCH] TT#110257 Add blob preference type to API tests Change-Id: I07367d34513fc98ecfb9a43f8983085e74c5b7dc --- t/api-rest/api-preferences.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/api-rest/api-preferences.t b/t/api-rest/api-preferences.t index 08a4f087e9..71956fe87a 100644 --- a/t/api-rest/api-preferences.t +++ b/t/api-rest/api-preferences.t @@ -7,6 +7,7 @@ use Test::More; use Data::Dumper; use JSON; use Clone qw/clone/; +use MIME::Base64 qw(encode_base64); use feature "state"; @@ -121,6 +122,8 @@ foreach my $api (@apis){ $value = get_preference_existen_value($preference, $api) // "test_api preference string"; }elsif('int' eq $preference->{data_type}){ $value = get_preference_existen_value($preference, $api) // 33; + }elsif('blob' eq $preference->{data_type}){ + $value = {content_type => "text/plain", data => encode_base64("Test blob text")}; }else{ die("unknown data type: ".$preference->{data_type}." for $preference_name;\n"); }