• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / 54385a8c-ec76-421e-81fd-41bf4c9d5b76

21 Jul 2025 08:55PM UTC coverage: 66.374% (-5.3%) from 71.631%
54385a8c-ec76-421e-81fd-41bf4c9d5b76

push

circleci

web-flow
Upgrade mediaflux build to v0.7.0 (#1617)

* Upgrade mediaflux build to v0.7.0

* prettier

* Upgrade mflux version used by the test suite

* tagging integration tests

* tagging integration tests

4 of 18 branches covered (22.22%)

0 of 1 new or added line in 1 file covered. (0.0%)

222 existing lines in 24 files now uncovered.

2722 of 4101 relevant lines covered (66.37%)

295.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/app/models/mediaflux/namespace_destroy_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
1✔
3
  # Destroy a MediaFlux namespace and everything in it
4
  # @example
5
  #   Mediaflux::NamespaceDestroyRequest.new(session_token: session_id, namespace: "/td-test-001/tigerdataNS/Banana1NS").destroy
6
  #   => true
7
  class NamespaceDestroyRequest < Request
1✔
8
    attr_reader :description, :namespace, :store
1✔
9

10
    # Constructor
11
    # @param session_token [String] the API token for the authenticated session
12
    # @param namespace [String] name of namespace to be destroyed
13
    # @param ignore_missing [Bool] ignore error if the namespace to delete is missing
14
    def initialize(session_token:, namespace:, ignore_missing: false)
1✔
15
      super(session_token: session_token)
1✔
16
      @namespace = namespace
1✔
17
      @ignore_missing = ignore_missing
1✔
18
    end
19

20
    def destroy
1✔
21
      resolve
1✔
22
      if error?
1✔
UNCOV
23
        if response_error.fetch(:message, "").include?("does not exist or is not accessible") && @ignore_missing
×
24
          # nothing to do
25
        else
UNCOV
26
          raise(StandardError, "call to service 'asset.namespace.hard.destroy' failed: The namespace #{namespace} does not exist or is not accessible")
×
27
        end
28
      end
29
    end
30

31
    # Specifies the Mediaflux service to use when destroying namespaces
32
    # @return [String]
33
    def self.service
1✔
34
      "asset.namespace.hard.destroy"
2✔
35
    end
36

37
    private
1✔
38

39
      def build_http_request_body(name:)
1✔
40
        super do |xml|
2✔
41
          xml.args do
2✔
42
            xml.namespace @namespace
2✔
43
            xml.atomic true
2✔
44
          end
45
        end
46
      end
47
  end
48
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc